projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b525556
)
fs: ext4: fix symlink read function
author
Ronald Zachariah
<
[email protected]
>
Thu, 28 Apr 2016 05:08:34 +0000
(07:08 +0200)
committer
Tom Rini
<
[email protected]
>
Mon, 2 May 2016 17:33:19 +0000
(13:33 -0400)
The function ext4fs_read_symlink was unable to handle a symlink
which had target name of exactly 60 characters.
Signed-off-by: Ronald Zachariah <
[email protected]
>
Signed-off-by: Stefan Roese <
[email protected]
>
Reviewed-by: Stephen Warren <
[email protected]
>
Cc: Tom Rini <
[email protected]
>
fs/ext4/ext4_common.c
patch
|
blob
|
history
diff --git
a/fs/ext4/ext4_common.c
b/fs/ext4/ext4_common.c
index 84fba767c1ad71e3a5df53c8bbd0696e2f690f81..40b798a43fa62e0237b3e70162efcaefc76a0f61 100644
(file)
--- a/
fs/ext4/ext4_common.c
+++ b/
fs/ext4/ext4_common.c
@@
-2040,7
+2040,7
@@
static char *ext4fs_read_symlink(struct ext2fs_node *node)
if (!symlink)
return 0;
- if (__le32_to_cpu(diro->inode.size) <
= 60
) {
+ if (__le32_to_cpu(diro->inode.size) <
sizeof(diro->inode.b.symlink)
) {
strncpy(symlink, diro->inode.b.symlink,
__le32_to_cpu(diro->inode.size));
} else {